<div class="dialog-div">
<form method='post'  id="form_{$_REQUEST[_URL_][2]}" action="{:U($_REQUEST[_URL_][2])}">
<input type="hidden" name="act" value="todo" >
<input type="hidden" name="level" value="3">
<input type="hidden" name="pid" value="{$pid}">

<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><table>
<tr>
	<td>名称</td>
	<td>	  <input type="text" name="title" class="title" /></td>
</tr>
<tr>
	<td>操作名：</td>
	<td><input type="text" name="name" class="name" />
	  必需是字母和下或线，不能有空格</td>
</tr>
<tr>
  <td>状态：</td>
  <td><SELECT name="status">
    <option value="1">启用</option>
    <option value="0">禁用</option>
    </SELECT></td>
</tr>
<tr>
  <td>模板：</td>
  <td><input name="demo_type" type="radio" value="index" checked="checked" />列表
    <input type="radio" name="demo_type" value="add" />
    添加对话框
    <input type="radio" name="demo_type" id="radio" value="edit" />
    修改对话框
    <input type="radio" name="demo_type" id="radio" value="show" />
    显示
    <input type="radio" name="demo_type" id="radio" value="export" />
    导出
    </td>
</tr>
<tr>
	<td>描 述：</td>
	<td><TEXTAREA name="remark"  rows="5" cols="57"></textarea></td>
</tr>
</table></td>
    <td valign="top">数据表：
      <input name="table_name" type="text" class="table_name" value="demo" />无需填写前缀
      <div>如需添加字段请到“<a href="{:U('Rbac/Field/index')}" style="color:#690" target="_blank">字段管理</a>”中增加</div>
		<div id="action_file_list"></div></td>
  </tr>
</table>
</form>
</div>
<script language="javascript">
//取得数据表中的数据字段
get_field();
$("#form_{$_REQUEST[_URL_][2]} .table_name").blur(function(){
	get_field();
});
function get_field(){
	var table_name=$("#form_{$_REQUEST[_URL_][2]} .table_name").val();
	var uri="{:U('Sys/Field/get_field?table_name=')}"+table_name;
	$.ajax({
		type: "get",
		url: uri,
		dataType:"html",
		success: function(html){
			$("#action_file_list").html(html);
		}
	});
}
</script>